package com.ww.orm.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author sunnannan
 * @version 1.0
 * @date 2020/11/26 3:27 下午
 */
@Entity
@Table(name = "act_re_model", schema = "bpm")
public class ActReModelEntity {
    private String id;
    private Integer rev;
    private String name;
    private String key;
    private String category;
    private Timestamp createTime;
    private Timestamp lastUpdateTime;
    private Integer version;
    private String metaInfo;
    private String deploymentId;
    private String editorSourceValueId;
    private String editorSourceExtraValueId;
    private String tenantId;

    @Id
    @Column(name = "ID_")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "REV_")
    public Integer getRev() {
        return rev;
    }

    public void setRev(Integer rev) {
        this.rev = rev;
    }

    @Basic
    @Column(name = "NAME_")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "KEY_")
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    @Basic
    @Column(name = "CATEGORY_")
    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Basic
    @Column(name = "CREATE_TIME_")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "LAST_UPDATE_TIME_")
    public Timestamp getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Timestamp lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    @Basic
    @Column(name = "VERSION_")
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Basic
    @Column(name = "META_INFO_")
    public String getMetaInfo() {
        return metaInfo;
    }

    public void setMetaInfo(String metaInfo) {
        this.metaInfo = metaInfo;
    }

    @Basic
    @Column(name = "DEPLOYMENT_ID_")
    public String getDeploymentId() {
        return deploymentId;
    }

    public void setDeploymentId(String deploymentId) {
        this.deploymentId = deploymentId;
    }

    @Basic
    @Column(name = "EDITOR_SOURCE_VALUE_ID_")
    public String getEditorSourceValueId() {
        return editorSourceValueId;
    }

    public void setEditorSourceValueId(String editorSourceValueId) {
        this.editorSourceValueId = editorSourceValueId;
    }

    @Basic
    @Column(name = "EDITOR_SOURCE_EXTRA_VALUE_ID_")
    public String getEditorSourceExtraValueId() {
        return editorSourceExtraValueId;
    }

    public void setEditorSourceExtraValueId(String editorSourceExtraValueId) {
        this.editorSourceExtraValueId = editorSourceExtraValueId;
    }

    @Basic
    @Column(name = "TENANT_ID_")
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ActReModelEntity that = (ActReModelEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(rev, that.rev) &&
                Objects.equals(name, that.name) &&
                Objects.equals(key, that.key) &&
                Objects.equals(category, that.category) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(lastUpdateTime, that.lastUpdateTime) &&
                Objects.equals(version, that.version) &&
                Objects.equals(metaInfo, that.metaInfo) &&
                Objects.equals(deploymentId, that.deploymentId) &&
                Objects.equals(editorSourceValueId, that.editorSourceValueId) &&
                Objects.equals(editorSourceExtraValueId, that.editorSourceExtraValueId) &&
                Objects.equals(tenantId, that.tenantId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, rev, name, key, category, createTime, lastUpdateTime, version, metaInfo, deploymentId, editorSourceValueId, editorSourceExtraValueId, tenantId);
    }
}
